package Bity;

import java.util.Scanner;

// 注意类名必须为 Main, 不要有任何 package xxx 信息
public class Main {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        // 注意 hasNext 和 hasNextLine 的区别
        while (in.hasNextInt()) { // 注意 while 处理多个 case
            int n = in.nextInt();
            int x = in.nextInt();
            int[] arr = new int[n];
            for (int i = 0; i < n; i++) {
                arr[i] = in.nextInt();
            }
            int left = 0;
            int right = left;
            int sum = 0;

            int minLeft = 0;
            int minRight = 0;
            while (right < arr.length){

                while (sum < 20 && right < arr.length){
                    sum += arr[right];
                    right++;

                }
                if (arr.length <= right || sum < 20){
                    break;
                }
                if ( minRight == minLeft ||(right-left + 1) < (minRight - minLeft + 1)){
                    minRight = right-1;
                    minLeft = left;
                }

                left++;
                right = left;
                sum = 0;
            }
            System.out.println(minLeft + " " + minRight);
        }
    }
}
